<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script>
if(top==self || top.name != 'index'){
//	top.location = '../index.php';
}
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="images/common.js"></script>
<link type="text/css" rel="stylesheet" href="images/admin.css" />
<style>
body{text-align:center;margin:0;padding:0; background:white;}
input{height:25px;font-size:18px;width:100px;}
.pink{background:#FFCCCC;}
.red{color:red;}
.tdd td{text-align:left;}
</style>
</head>
<body>

<div class="navigate">用户管理 - 用户查询</div>


<?php if(!empty($data) && $uid) :?>
<table width="418" border="1" class="table" style="float: left;">
	<tr>
		<td width="30%">uid:</td>
		<td width="70%"><?php echo $data['mid'] ?></td>
	</tr>
	<tr>
		<td>平台数据:</td>
		<td>
		<div><img
			src="<?php echo ( isset($data['icon']) && !empty($data['icon']) ) ? $data['icon'] : 'http://graph.facebook.com/' . $data['puid'] . '/picture' ?>" /></div>
		<div>平台ID: <?php echo isset($data['puid']) ? $data['puid'] : '' ?><a target="_blank" href="http://facebook.com/profile.php?id=<?php echo isset($data['puid']) ? $data['puid'] : '' ?>">进入fb</a></div>
		<div>姓名: <?php echo isset($data['mname']) ? $data['mname'] : '' ?></div>
		<div>主页地址: <?php echo isset($data['link']) ? $data['link'] : '' ?></div>
		</td>
	</tr>
	<tr>
	<?php // echo $data['mstatus'] ?>
		<td>状态:</td>
		<td>
		<form action='./user.php?mid=5' method='post'><input type='hidden'
			name='mid' value='5' /> <select name="mstatus" style="width: 100px;">
			<option value="0">正常用户</option>
		</select> <input type='submit' value='更改状态' /></form>
		</td>
	</tr>

	<tr>
		<td>金币:</td>
		<td><?php echo $data['money'] ?></td>
	</tr>
	<tr>
		<td>赢的次数:</td>
		<td><?php echo $data['wintimes'] ?></td>
	</tr>
	<tr>
		<td>输的次数:</td>
		<td><?php echo $data['losetimes'] ?></td>
	</tr>
	<tr>
		<td>总游戏次数:</td>
		<td><?php echo $data['wintimes'] + $data['losetimes'] ?></td>
	</tr>

	<tr>
		<td>经验值:</td>
		<td><?php echo $data['exp'] ?></td>
	</tr>

	<tr>
		<td>登录次数:</td>
		<td><?php echo $data['mentercount'] ?></td>
	</tr>
	<tr>
		<td>加入时间:</td>
		<td><?php echo date('Y-m-d H:i:s', $data['mtime']) ?></td>
	</tr>
	<tr>
		<td>最后登录:</td>
		<td><?php echo date('Y-m-d H:i:s', $data['mactivetime']) ?></td>
	</tr>
	<tr>
		<td>等级:</td>
		<td><?php echo $data['level'] ?></td>
	</tr>
	<tr>
		<td colspan="2">
			<a href="http://apps.facebook.com/boastdice/?deb=1&uid=<?php echo $data['mid'] ?>" target="_blank">模拟登录</a>
			封号
			<a href="?account-act_gold?uid=<?php echo $data['mid'] ?>" target="table_detail">加减金币</a>
			<a href="?account-get_golddetail?uid=<?php echo $data['mid'] ?>" target="table_detail">金币记录</a>
			<a href="?account-get_tablelog_detail?uid=<?php echo $data['mid'] ?>" target="table_detail">牌局记录</a>
			<a href="?account-act_clearsession?uid=<?php echo $data['mid'] ?>" target="table_detail">清除用户桌子记录</a>
		</td>
	</tr>
</table>
<div style="float: left; width: 1200px;"><iframe id="table_detail"
	name="table_detail" frameborder="0" width="100%" height="800"></iframe>
</div>
<?php else: ?>

<form action="" method="post" style="padding: 0;">
<table width="926" border="1" class="table">
	<tr>
		<th width="172" colspan="5">查找条件</th>
	</tr>
	<?php if(isset($_REQUEST['uid']) || isset($_REQUEST['puid'])) : ?>
	<tr>
		<td colspan='4' style='text-align: left;'>没有找到这个用户</td>
	</tr>
	<?php endif; ?>
	<tr>
		<td colspan='4' style='text-align: left;'>用户游戏ID: <input name="uid" />
		用户平台ID: <input name="puid" /> <input type='submit'
			value='确定' /></td>

	</tr>
</table>
</form>
<?php endif ?>
<!-- <?php echo $url ?> -->
</body>
<script type="text/javascript" src="../images/calendar.js"></script>
</html>